home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat2 / standard / semget.z / semget
Encoding:
Text File  |  1998-10-20  |  6.3 KB  |  133 lines

  1.  
  2.  
  3.  
  4. sssseeeemmmmggggeeeetttt((((2222))))                                                            sssseeeemmmmggggeeeetttt((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _ssss_eeee_mmmm_gggg_eeee_tttt - get set of semaphores
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_iiii_pppp_cccc_...._hhhh_>>>>
  14.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_ssss_eeee_mmmm_...._hhhh_>>>>
  15.  
  16.      _iiii_nnnn_tttt _ssss_eeee_mmmm_gggg_eeee_tttt_((((_kkkk_eeee_yyyy______tttt _kkkk_eeee_yyyy_,,,, _iiii_nnnn_tttt _nnnn_ssss_eeee_mmmm_ssss_,,,, _iiii_nnnn_tttt _ssss_eeee_mmmm_ffff_llll_gggg_))))_;;;;
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      _ssss_eeee_mmmm_gggg_eeee_tttt returns the semaphore identifier associated with _k_e_y.
  20.  
  21.      A semaphore identifier and associated data structure and set containing
  22.      _n_s_e_m_s semaphores [see _iiii_nnnn_tttt_rrrr_oooo(2)] are created for _k_e_y if one of the
  23.      following is true:
  24.  
  25.           _k_e_y is equal to _IIII_PPPP_CCCC______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE.
  26.  
  27.           _k_e_y does not already have a semaphore identifier associated with it,
  28.           and (_s_e_m_f_l_g_&&&&_IIII_PPPP_CCCC______CCCC_RRRR_EEEE_AAAA_TTTT) is true.
  29.  
  30.      On creation, the data structure associated with the new semaphore
  31.      identifier is initialized as follows:
  32.  
  33.           _ssss_eeee_mmmm______pppp_eeee_rrrr_mmmm_...._cccc_uuuu_iiii_dddd, _ssss_eeee_mmmm______pppp_eeee_rrrr_mmmm_...._uuuu_iiii_dddd, _ssss_eeee_mmmm______pppp_eeee_rrrr_mmmm_...._cccc_gggg_iiii_dddd, and _ssss_eeee_mmmm______pppp_eeee_rrrr_mmmm_...._gggg_iiii_dddd are set
  34.           equal to the effective user ID and effective group ID, respectively,
  35.           of the calling process.
  36.  
  37.           The access permission bits of _ssss_eeee_mmmm______pppp_eeee_rrrr_mmmm_...._mmmm_oooo_dddd_eeee are set equal to the
  38.           access permission bits of _s_e_m_f_l_g.
  39.  
  40.           _ssss_eeee_mmmm______nnnn_ssss_eeee_mmmm_ssss is set equal to the value of _n_s_e_m_s.
  41.  
  42.           _ssss_eeee_mmmm______oooo_tttt_iiii_mmmm_eeee is set equal to 0 and _ssss_eeee_mmmm______cccc_tttt_iiii_mmmm_eeee is set equal to the
  43.           current time.
  44.  
  45.  
  46.  
  47.      _ssss_eeee_mmmm_gggg_eeee_tttt fails if one or more of the following are true:
  48.  
  49.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL         _n_s_e_m_s is either less than or equal to zero or greater than
  50.                     the system-imposed limit.
  51.  
  52.      _EEEE_AAAA_CCCC_CCCC_EEEE_SSSS         A semaphore identifier exists for _k_e_y, but operation
  53.                     permission [see _iiii_nnnn_tttt_rrrr_oooo(2)] as specified by the low-order 9
  54.                     bits of _s_e_m_f_l_g would not be granted.
  55.  
  56.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL         A semaphore identifier exists for _k_e_y, but the number of
  57.                     semaphores in the set associated with it is less than
  58.                     _n_s_e_m_s, and _n_s_e_m_s is not equal to zero.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. sssseeeemmmmggggeeeetttt((((2222))))                                                            sssseeeemmmmggggeeeetttt((((2222))))
  71.  
  72.  
  73.  
  74.      _EEEE_NNNN_OOOO_EEEE_NNNN_TTTT         A semaphore identifier does not exist for _k_e_y and
  75.                     (_s_e_m_f_l_g_&&&&_IIII_PPPP_CCCC______CCCC_RRRR_EEEE_AAAA_TTTT) is false.
  76.  
  77.      _EEEE_NNNN_OOOO_SSSS_PPPP_CCCC         A semaphore identifier is to be created but the system-
  78.                     imposed limit on the maximum number of allowed semaphore
  79.                     identifiers system wide would be exceeded.
  80.  
  81.      _EEEE_NNNN_OOOO_SSSS_PPPP_CCCC         A semaphore identifier is to be created but the system-
  82.                     imposed limit on the maximum number of allowed semaphores
  83.                     system wide would be exceeded.
  84.  
  85.      _EEEE_EEEE_XXXX_IIII_SSSS_TTTT         A semaphore identifier exists for _k_e_y but both
  86.                     (_s_e_m_f_l_g_&&&&_IIII_PPPP_CCCC______CCCC_RRRR_EEEE_AAAA_TTTT) and (_s_e_m_f_l_g_&&&&_IIII_PPPP_CCCC______EEEE_XXXX_CCCC_LLLL) are both true.
  87.  
  88. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  89.      _iiii_nnnn_tttt_rrrr_oooo(2), _ssss_eeee_mmmm_cccc_tttt_llll(2), _ssss_eeee_mmmm_oooo_pppp(2), _ssss_tttt_dddd_iiii_pppp_cccc(3C).
  90.  
  91. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  92.      Upon successful completion, a non-negative integer, namely a semaphore
  93.      identifier, is returned.  Otherwise, a value of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo
  94.      is set to indicate the error.
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.